package svgedit.germangui.actions;

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;

import svgedit.gui.DocumentPropertiesDialog;
import svgedit.germangui.GermanFrame;

/** Shows the document properties dialog.
 */
@SuppressWarnings("serial")
public class EditDocumentPropertiesAction extends AbstractAction {

    private GermanFrame germanFrame;

    /** Create this action for the given frame */
    public EditDocumentPropertiesAction(GermanFrame germanFrame) {
        super("Dokumenteigenschaften...");
        this.germanFrame = germanFrame;
    }

    public void actionPerformed(ActionEvent ae) {
        DocumentPropertiesDialog dlg = new DocumentPropertiesDialog(germanFrame.getDocument());
        dlg.setModal(true);
        dlg.setLocationRelativeTo(germanFrame);
        dlg.setVisible(true);
        germanFrame.repaint();
    }

}
